package nsn.message.aggregator.views.sources;


import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.model.BaseWorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.ViewPart;

/**
 * 
 * @author Lukasz Nowak
 * @since 13-03-2011
 * 
 */
public class SourcesView extends ViewPart {

	private TreeViewer _treeViewer;

	/**
	 *
	 */
	public SourcesView() {
		super();
	}

	@Override
	public void createPartControl(final Composite parent) {
		_treeViewer = new TreeViewer(parent, //
				SWT.SINGLE | SWT.V_SCROLL);
		_treeViewer.setContentProvider(//
				new BaseWorkbenchContentProvider());
		_treeViewer.setLabelProvider(//
				new WorkbenchLabelProvider());
		
		_treeViewer.setInput(getInput());
	}
	
	private Object getInput() {
		return null;
	}

	@Override
	public void setFocus() {
		_treeViewer.getControl().setFocus();
	}

	@Override
	public void dispose() {
		_treeViewer = null;
		super.dispose();
	}




}
